<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div{
      margin: 20px;
      display: inline-block;
      width: 100px;
      height: 100px;
      background-color: red;
    }
    /* 上 */
    .box1{
      box-shadow: 0 3px blue inset;
    }

    /* 下 */
    .box2{
      box-shadow: 0 -3px blue inset;
    }
    /* 左 */
    .box3{
      box-shadow: 3px 0 blue inset;
    }
    /* 右 */
    .box4{
      box-shadow: -3px 0 blue inset;
    }

    /* 全内 */
    .box5 {
      box-shadow: 3px 3px blue inset,
      -3px -3px blue inset,
      -3px 3px blue inset,
      3px -3px blue inset
    }

  </style>
</head>
<body>
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
<div class="box4"></div>
<div class="box5"></div>
</body>
</html>
